pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let nums = num_str.split(|c| c == '(' || c == ')').collect::<Vec<_>>();
    let base:u32 = nums[1].parse().unwrap();
    let n = nums[0]
        .chars()
        .rev()
        .enumerate()
        .fold(0, |acc, x| acc + x.1.to_digit(base).unwrap() * base.pow(x.0 as u32));
    let mut quotient = n / to_base;
    let mut ret = format!("{:x}",n % to_base);
    while quotient != 0 {
        ret = format!("{:x}",quotient % to_base) + &ret;
        quotient = quotient / to_base;
    }
    ret
}
